<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AJAX Time</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	var timeid = "timeid";
	$("#timebutton").click(function() {
		$("#local").load('/TimeAjax/TimeServlet', {timeid: "local"});
		$("#GMT").load("/TimeAjax/TimeServlet", {timeid: "GMT"});
		$("#newyork").load("/TimeAjax/TimeServlet", {timeid: "newyork"});
	});
	$("#errorMsg").ajaxError(function(event, request, settings, error){
		$(this).append("ajax call failed: " + settings.url);
		alert(settings.url);
	});
});
</script>
</head>
<body>

<table border="1">
	<tr>
		<td>Local Time</td>
		<td>GMT Time</td>
		<td>New York Time</td>
	</tr>
	<tr>
		<td><span id="local">&nbsp;</span></td>
		<td><span id="GMT">&nbsp;</span></td>
		<td><span id="newyork">&nbsp;</span></td>
	</tr>
	<tr>
		<td colspan="3"><div id="errorMsg"></div></td>
	</tr>
</table>

<button id="timebutton">Show Times</button>
</body>
</html>